import axios from '../axios';
/**
 * 门店指标请求服务器接口
 * @interface common/api/storeCondition
 * @author zah
 */
export default {
  /**
   * @param  {Object} data - 门店情况基础数据入参
   * @example 参数 { timeFlag: 1-日/2-周/3-月/4-年, beginTime: "1505727279573", endTime: "1505727279573"}
   * @returns {Object} 接口返回成功或者失败
   */
  getStoreMsg (data) {
    return axios.postWithSCode('api/report/store/top/index', data);
  },
  /**
   * @param  {Object} data - 门店情况折线图入参
   * @example 参数 { timeFlag: 1-日/2-周/3-月/4-年, beginTime: "1505727279573", endTime: "1505727279573"}
   * @returns {Object} 接口返回成功或者失败
   */
  getStoreLine (data) {
    return axios.postWithSCode('api/report/store/tendency/chart', data);
  },
  /**
   * @param  {Object} data - 实时桌态入参
   * @example 参数 { storeCode: ['1234'], groupCode: '1234'}
   * @returns {Object} 接口返回成功或者失败
   */
  getTabTime (data) {
    return axios.postWithSCode('api/report/store/table/state', data);
  }
};
